package main;

import util.TripleDesUtil;

public class DesTriple {
    public static void main(String[] args) {
        String op = args[0];
        String src = args[1];
        String key = args[2];
        switch (op){
            case "en":
                System.out.println(String.format(
                        "%s + %s = %s",
                        src,
                        key,
                        TripleDesUtil.tripleDesEncrypt(src, key)
                ));
                break;
            case "de":
                System.out.println(String.format(
                        "%s - %s = %s",
                        src,
                        key,
                        TripleDesUtil.tripleDesDecrypt(src, key)
                ));
        }
    }
}
